using System.Runtime.CompilerServices;
using Awaiter;
using YesPlayLove.Clusters;
using Yoshi.Classes;

namespace YesPlayLove.Classes
{
    [IgnoreNamespace]
    public static class AlivenessFeed
    {
        public static FeedBubble CurrentFeed;

        public static void DeleteFeedItem(string itemId)
        {
            if (CurrentFeed != null)
            {
                Master.Profile.FeedData.DeleteItem(itemId);
                UpdateFeedAw(Await.AsyncAw);
            }
        }

        public static void UpdateFeedAw(Await awp)
        {
            new Await()
                .AddDx(delegate { if (CurrentFeed != null) CurrentFeed.Refresh(); })
                .Commit(awp);
        }
    }
}
